package cn.schoolwow.quickdao.module.database.dml.json.service.save;

import cn.schoolwow.quickdao.module.database.dml.json.flow.common.check.CheckUniqueFieldNameFlow;
import cn.schoolwow.quickdao.module.database.dml.json.flow.insert.get.DistinguishExistJSONArrayFlow;
import cn.schoolwow.quickdao.module.database.dml.json.flow.insert.get.GetUniqueFieldValueListFlow;
import cn.schoolwow.quickdao.module.database.dml.json.flow.save.SaveJSONArrayFlow;
import cn.schoolwow.quickflow.QuickFlowExecutor;
import cn.schoolwow.quickflow.flow.CompositeBusinessFlow;

public class SaveJSONArrayCompositeBusiness implements CompositeBusinessFlow {
    @Override
    public void executeCompositeBusiness(QuickFlowExecutor quickFlowExecutor) {
        quickFlowExecutor.next(new CheckUniqueFieldNameFlow())
                .next(new GetUniqueFieldValueListFlow())
                .next(new DistinguishExistJSONArrayFlow())
                .next(new SaveJSONArrayFlow());
    }

    @Override
    public String name() {
        return "保存JSON数组复合流程";
    }
}
